package com.bw.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.bw.dao.AMapper;
import com.bw.entity.A;
import com.bw.service.AService;

@Service(value = "aService")
public class AServiceImpl implements AService {

    @Autowired
    private AMapper<A>aMapper;
    
    @Override
    public Integer insertSelective(A a) throws Exception {
           return this.aMapper.insertSelective(a);
        }

    @Override
    public Integer insertBatch(List<A> a) throws Exception {
           return this.aMapper.insertBatch(a) ;
        }

    @Override
    public Integer deleteByPrimaryKey(Object id) {
            return this.aMapper.deleteByPrimaryKey(id);
    }

    public Integer deleteBatchByPrimaryKey(List<Object> ids) {
           return this.aMapper.deleteBatchByPrimaryKey(ids);
    }

    @Override
    public Integer updateByPrimaryKeySelective(A a) {
           return this.aMapper.updateByPrimaryKeySelective(a);
    }

    @Override
    public A findById(Object id) {
           return (A) this.aMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<A> selectByCondition(A a) {
           return (List<A>) this.aMapper.selectByCondition(a);
    }

    @Override
    public Integer selectCountByCondition(A a) {
           return  this.aMapper.selectCountByCondition(a);
    }

}
